home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / afreq301.zip / DIRMAINT.ZIP / DIRMAINT.DOC next >
Text File  |  1991-06-26  |  9KB  |  232 lines

  1.  
  2.                                   DIRMAINT
  3.              Searchlight BBS File Directory Maintenance Program
  4.  
  5.                          Version 2.15, June, 1991
  6.  
  7.  
  8. Introduction
  9.  
  10.    DIRMAINT is a command-line utility program for Searchlight BBS 2.15 which 
  11. allows you to maintain Searchlight file directories outside of the main 
  12. FILES.EXE program.  Dirmaint includes commands to add and delete files, 
  13. update files (file size, date and/or description) and password protect (or 
  14. unprotect) files.  
  15.  
  16.  
  17. Syntax
  18.  
  19.    The syntax for DIRMAINT is as follows:
  20.  
  21.    DIRMAINT DirName Command [Options] FileName(s) ["Descrip/Passwd"]
  22.  
  23. The first parameter, DirName, is the name of the directory file that you 
  24. will be updating.  This should be the actual name of the <filedir>.SL2 file 
  25. on disk, and can include a path if the SL2 file is in a different directory.  
  26. Note that DIRMAINT works directly with <filedir>.SL2 files, and does not 
  27. process (or require access to) the Searchlight CONFIG file or FILEDIR.SL2 
  28. file.  
  29.  
  30. The main commands are:
  31.  
  32.     A   Add file
  33.     K   Kill files
  34.     U   Update files
  35.     P   Password protect files
  36.  
  37. Options are:
  38.  
  39.     /D  Use DOS system date when adding or updating
  40.     /F  Use file date when adding/updating
  41.     /P  Prompt for descriptions or passwords
  42.     /R  Perform record locking (for multiuser systems)
  43.  
  44. Any combination of one or more single filenames or wildcards can be 
  45. specified on the command line; wildcards are processed differently for the 
  46. Add command than they are for the Kill, Update and Password commands (see 
  47. below).  Finally, one file description may be included in quotes (must be in 
  48. quotes) for Add or Update commands or one password (also in quotes) with the 
  49. Password command.  Use the /P switch if you want to add or update several 
  50. descriptions or passwords at once.  
  51.  
  52.  
  53. Add Files
  54.  
  55.    DIRMAINT lets you add one or more legal filenames to the <filedir>.SL2 
  56. file, whether or not the files actually exist.  If a file does exist, its 
  57. size is read from the DOS directory; otherwise, the size is set to zero and 
  58. the file is marked as an offline file.  DIRMAINT checks for files only in 
  59. the current directory, so it should be run from the directory in which the 
  60. <filedir>.SL2 file expects to find its files.  
  61.  
  62.    If the /F command line parameter is used, DIRMAINT reads the file's last 
  63. update date directly from the DOS directory and assigns that date to the 
  64. SLBBS SL2 file entry.  Otherwise, the current system date is used.  New 
  65. files added with DIRMAINT are owned by the SYSOP account.  
  66.  
  67.    If /P was specified on the command line, DIRMAINT will prompt you to 
  68. enter a description for each file added; otherwise, the description given on 
  69. the command line (if any) is used.  If multiple files are added and no /P 
  70. switch is used, the description given on the command line is given to all 
  71. files added.  Since DIRMAINT reads the standard input stream when inputting 
  72. descriptions, it is possible to redirect a list of descriptions to DIRMAINT 
  73. with a pipe.  
  74.    Note that only one-line descriptions can be added via the command line.  
  75. If multiline descriptions are needed, the /P switch must be used.  
  76.  
  77.    Add Files supports the addition of multiple filenames in the following 
  78. manner: for each WILDCARD specified on the command line, all files which 
  79. exist in the current (DOS) directory that match the specification are added.  
  80. Each single, non-wildcard filename is added regardless of whether a matching 
  81. DOS file exists (the file is marked as offline if it cannot be found).  You 
  82. can specify any number of single filenames and/or wildcards on each command 
  83. line (separated by spaces) with the only limitation being the length of the 
  84. command line.  See examples below.  
  85.  
  86.    An attempt to add a file that already exists in the Searchlight directory 
  87. will be ignored.  Use the update command to change existing files.  
  88.  
  89.  
  90. Kill Files
  91.  
  92.    This command deletes the specified entries from the SL2 file (the actual 
  93. DOS files, if any, are not deleted or modified).  No options or description 
  94. need be included for Kill commands.  A count of the number of files killed 
  95. is printed on exit.  
  96.  
  97.  
  98. Update Files
  99.  
  100.    This command updates the specified files by changing the file sizes to 
  101. the actual DOS file sizes and, optionally, modifying the file dates and/or 
  102. descriptions.  If a DOS file exists, the Searchlight directory entry is 
  103. updated to reflect the DOS file's actual size.  Otherwise, the DIR entry is 
  104. marked as an offline file (the old file size is not changed).  
  105.  
  106.    If you include a description on the command line, DIRMAINT updates the 
  107. file's description, replacing it with your command line argument.  If you 
  108. include the /P switch, DIRMAINT prompts you to enter a new description for 
  109. each file updated (you can press Return to accept the default for each 
  110. line).  If you update multiple files and include a command line description, 
  111. you will assign that description to ALL files being updated.  
  112.  
  113.    If the /D or /F options are given, DIRMAINT updates file dates.  As with 
  114. the Add command, the /F switch loads the file dates from the DOS directory 
  115. entry, whereas the /D switch loads the current system date.  If /F is used, 
  116. but a file does not exist, then the system date is used by default.  If 
  117. neither /F nor /D are given, the date is not changed.
  118.  
  119.  
  120. Password Protect Files
  121.  
  122.    This command allows you to change the password of the specified files.  
  123. You can enter a password on the command line (in quotes) or use the /P 
  124. switch to have DIRMAINT prompt you for a password.  To remove a password 
  125. from a file, either give no password on the command line, or press Enter 
  126. when prompted for a password.
  127.  
  128.    Note that if you specify a password on the command line and multiple 
  129. files, all files are assigned the same password.
  130.  
  131.  
  132.  
  133. Directory Issues
  134.  
  135.    DIRMAINT should be run from the DOS directory which contains the 
  136. downloadable files for the specified Searchlight directory; in other words, 
  137. the same directory as the "Path To Files" specified in the SETUP program.
  138.  
  139.    If your <filedir>.SL2 file is not in the same directory, you need to 
  140. specify its path when providing the "DirName" parameter.  For example, if 
  141. you have a directory called UPLOADS for which the UPLOADS.SL2 file is 
  142. located in "C:\DIRS" and the data files are located in "C:\FILES\UPLOADS",
  143. you would use a command such as:
  144.  
  145.    DIRMAINT c:\dirs\uploads ...
  146.  
  147. You should be positioned in C:\FILES\UPLOADS before running this command.
  148.  
  149.  
  150.  
  151. Record Locking
  152.  
  153.    On multiuser systems, record locking should be enabled if DIRMAINT is 
  154. used to update directories which may be in simultaneous use by another node.  
  155. To enable record locking, add the /R switch to the command line.  Note that 
  156. record locking requires that DOS 3.3 or later be running and SHARE.EXE or 
  157. its equivalent is loaded.
  158.  
  159.  
  160.  
  161. Examples:
  162.  
  163. DIRMAINT Uploads A ALLFILES.ZIP "List Of Available Files"
  164.  
  165.    This command adds the file ALLFILES.ZIP to the Uploads directory 
  166. (UPLOADS.SL2 should be present in the current DOS directory).  The file is 
  167. added with the description "List Of Available Files", and the current system 
  168. date.  
  169.  
  170.  
  171. DIRMAINT Uploads A /F SL*.ZIP "Searchlight support file"
  172.  
  173.    This command adds to the Uploads directory all files that match the 
  174. wildcard SL*.ZIP which are not already listed in the directory.  Each file 
  175. is added with the file's actual date, and the description "Searchlight 
  176. support file".
  177.  
  178.  
  179. DIRMAINT c:\dirs\Uploads A /P TEMP.ZIP UPDATE.ZIP
  180.  
  181.    Adds the files TEMP.ZIP and UPDATE.ZIP to the Uploads directory, 
  182. prompting for descriptions.  The filenames are entered into the uploads 
  183. directory regardless of whether they actually exist.
  184.    In this example, we assume that the upload directory (UPLOADS.SL2) is in 
  185. C:\DIRS.  The command should be executed from the directory in which the 
  186. files TEMP.ZIP and UPDATE.ZIP are expected to be located if they exist.
  187.  
  188.  
  189. DIRMAINT Uploads K TEMP.ZIP SL*.ZIP UPDATE.ZIP
  190.  
  191.    Deletes TEMP.ZIP, UPDATE.ZIP, and all files matching the wildcard 
  192. SL*.ZIP.  A count of the number of files deleted is displayed.
  193.  
  194.  
  195. DIRMAINT Uploads U /F ALLFILES.ZIP
  196.  
  197.    Updates the entry for ALLFILES.ZIP to reflect the current file size and 
  198. file date for that file.
  199.  
  200.  
  201. DIRMAINT Uploads U /P SL*.ZIP
  202.  
  203.    Updates the file sizes for all files matching the wildcard, and also 
  204. prompts for new descriptions for the files.  The file dates are not 
  205. changed.
  206.  
  207.  
  208. DIRMAINT Uploads U ALLFILES.ZIP "Master file directory list"
  209.  
  210.    Changes the description of ALLFILES.ZIP to "Master file directory list".  
  211. The file size is also updated.
  212.  
  213.  
  214. DIRMAINT Uploads P MYFILE.TXT "Tornado"
  215.  
  216.    Changes the password on MYFILE.TXT to "Tornado".  Passwords are not case 
  217. sensitive.
  218.  
  219.  
  220. DIRMAINT Uploads P MYFILE.TXT /P
  221.  
  222.    Prompts for the password for MYFILE.TXT.  Note that passwords are entered 
  223. once only and are displayed as entered (unlike the FILES program which uses 
  224. a dots-echo input routine and double checks entries).
  225.  
  226.  
  227. DIRMAINT Uploads P *.*
  228.  
  229.    Removes passwords from all files in the Uploads directory.
  230.  
  231.  
  232.